/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.vasthu.api.dao;

import com.vasthu.api.domain.PurchasedItem;
import java.sql.Connection;
import java.util.List;

/**
 * this is used to manage the relation among the Bill and the items which are
 * purchased for that bill
 *
 * @author moremada
 */
public interface PurchasedItemDAO {

    boolean insert(PurchasedItem purItem, long billId);

    /*
     * this will returns all the PurchasedItems assoctiated with the given bill.
     * but mapping Stock instance will be having only it's id rest of the data
     * will of Stock will be default values for all PurchasedItems returned by
     * this function
     */
    List<PurchasedItem> getPurchasedItems(long billId);
    
    boolean update(PurchasedItem purItem, long billId);
    
    boolean delete(PurchasedItem purItem, long billId);
}
